package com.example.my.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.my.entity.Permission;   // ✅ 引入实体类

import java.util.List;
import java.util.Set;

public interface PermissionService extends IService<Permission> {


    IPage<Permission> getPermissionsByPage(Page<Permission> page);

    IPage<Permission> getPermissionsByPageWithCondition(Page<Permission> page, String keyword);

    List<Permission> getPermissionsByUserId(Long userId);

    List<Permission> getPermissionsByRoleId(Long roleId);

    Set<String> getPermissionsByUserIdSet(Long userId);

    Set<String> getPermissionsByRoleIdSet(Long roleId);

    void assignPermissionsToRole(Long roleId, List<Long> permissionIds);
}
